package com.cn.yang.service.impl;

import com.cn.yang.bean.Group;
import com.cn.yang.bean.Personnel;
import com.cn.yang.dao.GroupDao;
import com.cn.yang.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupServiceImpl implements GroupService {
    @Autowired
    GroupDao groupDao;
    @Override
    public void insertGroup(List<Group> list) {
        groupDao.insertGroup(list);
    }

    @Override
    public int groupCodeAdd(Group group) {
        return groupDao.groupCodeAdd(group);
    }

    @Override
    public List<Group> selectGroupCode() {
        return groupDao.selectGroupCode();
    }

    @Override
    public List<Group> selectGroup(String groupNumber) {
        return groupDao.selectGroup(groupNumber);
    }

    @Override
    public void deleteMyGroup(Personnel personnel) {
        groupDao.deleteMyGroup(personnel);
    }

    @Override
    public void updateOddGroup(Personnel personnel) {
        groupDao.updateOddGroup(personnel);
    }

    @Override
    public void addMyGroup(Personnel personnel) {
        groupDao.addMyGroup(personnel);
    }

    @Override
    public void updateNewGroup(Personnel personnel) {
        groupDao.updateNewGroup(personnel);
    }

    @Override
    public Group selectGroupCodeNumber(String groupNumber) {
        return groupDao.selectGroupCodeNumber(groupNumber);
    }

    @Override
    public void deleteGroupCode(Group group) {
        groupDao.deleteGroupCode(group);
    }

    @Override
    public int deleteGroup(Group group) {
        return groupDao.deleteGroup(group);
    }
}
